home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 033a / vbbs530.zip / VSCRIPT.DOC < prev    next >
Text File  |  1991-11-06  |  33KB  |  1,015 lines

  1.  
  2.                      The Vscript script language
  3.                     =-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  4.  
  5. The script languange itself has some similarities to REXX. A script
  6. is composed of lines of pure ASCII text that can be written using
  7. just about any word processor in ASCII mode.
  8.  
  9. A few features of the language are:
  10.  
  11. -Scalar variables which can be used for storing numbers, strings, characters
  12. -Numeric and String operators
  13. -Commands supporting various types of serial input and output
  14. -Built-in database/data buffer commands
  15. -User account modify sysop-defined fields commands
  16. -Commands which provide functions for a multi-user system
  17. -Transfer control, subroutine, relational testing/branching
  18. -Chain execution to another script
  19. -Definable Break processing
  20. -SHELL to DOS capability
  21. -Compiled Script Language (Loads and Executes Faster!)
  22. -FINDFIRST and FINDNEXT commands for searching DOS directories
  23. -Automatic ANSI control
  24. -Up to 20 time-programmed events per day
  25. -VBBS releases all RAM before running DOORS and Events, freeing up more
  26. space for your other programs and multitasking.
  27.  
  28.  
  29.  
  30.         A simple excersize in modifying a script might begin in Start.V
  31. with a customized new user letter from the SysOp. Where you see "We hope
  32. you find your stay here enjoyable", you will notice that it is preceded
  33. by a BUFFER APPEND command. Using the same structure you may easily add
  34. additional lines to the letter. Once you have done this, you simply type
  35. Vcom start.v and your modified script will be compiled. You may go
  36. through the scripts and change lines of text, add or change colors though
  37. the the use of color commands ($blue, $green $magenta etc), and just
  38. experiment. Note that the ! character is the comment character and
  39. anything following ! within the script will be ignored.
  40.  
  41.  
  42.  
  43.                             The SCRIPT Language
  44.                            ~~~~~~~~~~~~~~~~~~~~~
  45. VBBS comes with a COMPLETE set of scripts -- you can set up and run your
  46. new VBBS in a matter of minutes. The script language is a very powerful part
  47. of VBBS that gives it truly amazing flexibility. It is easy to
  48. included scripts (and design new ones ), a thorough
  49. explanation follows.
  50.  
  51. First off, a script is nothing more than an ASCII text file containing your
  52. commands, one per line. When your script is compiled, parsed ("tokenized")
  53. and coded into a binary form which loads and executes much faster. When it
  54. is executed, the coded form is loaded entirely into memory.
  55. The definition of a TOKEN under VBBS is very important. The commands
  56. use these tokens are their parameters.
  57.  
  58. A token is defined as:
  59. 1. Any unspaced string of characters,
  60. or
  61. 2. Any string surrounded either by single quotes or double quotes.
  62.    (So that you can embed spaces in strings.)
  63.    Of course, the outside quotes are NOT actually a part of the string.
  64.  
  65. (This definition of a token is very similar to that for REXX.)
  66.  
  67. As you can surmise from the definition, spaces are used to delimit words,
  68. with quotes as an over-ride.
  69.  
  70. Up to seven tokens may be specified per line. With the exception of
  71. the assignment statement, the first token in the line must be a script
  72. command. Tokens may be either string literals or script variables.
  73. The VBBS script language is NOT CASE-SENSITIVE. (Capitalization used in
  74. this text is not required and is done only for clarity.)
  75.  
  76. Scalar variables in the VBBS script language begin with a $ character. All
  77. variable data is stored as string data, even numeric data. Numeric data is,
  78. however, temporarily converted to binary single-precision form for computations.
  79.  
  80. Assignment to variables is done with the = character. For example:
  81.  
  82.    $test = 1             {Loads the string '1' into the variable $test}
  83.    $test = "1"           {Exactly equivalent to $test = 1}
  84.    $greeting = "Hello"   {Sets variable $greeting to 'Hello'}
  85.  
  86. There are several numeric and string operators. You may only use operators
  87. in assignment statements, and you may do up to two operations per line
  88. (because of the 7 token per line maximum).
  89.  
  90. + Addition
  91. - Subtraction
  92. * Multiplication
  93. / Division
  94.  
  95.    $test = $value * 10       {Multiplies the contents of $value by 10
  96.                               and stores the result in $test}
  97.    $test = $value - $loss    {Subtracts the value of $loss from $value
  98.                            and stores the result in $test}
  99.    $test = $count - 1 * 100  {Takes value of $count, subtracts 1, then
  100.                               multiplies by 100 and stores the result in
  101.                               $test}
  102.  
  103. & String Concatenation
  104.  
  105.    $test = "Welcome Back, " & $name
  106.  
  107. In addition to above, there are a few of built-in functions.
  108. Syntactically, though, they look more like operators. Actually, the
  109. way they were implemented is "Quite Illogical, Captain."
  110. But it was done this way for speed, and it works!
  111.  
  112. INT Chops off the fractional part of a number.
  113.  
  114.    $test = $value INT 0      {Takes the value of $value, chops the fractional
  115.                               part and stores the result in $test. The 0 is a
  116.                               dummy placeholder, and is REQUIRED}
  117.  
  118.    $test = $count * 10 INT 0 {Takes the value of $count, multiplies by 10,
  119.                               then chops the fraction and stores the result
  120.                               in $test}
  121.  
  122. RND Generates Psuedo-random numbers in a specified range.
  123.  
  124.    $random = 1 RND 10  {Generates a random number between 1 and 10, inclusive}
  125.  
  126. UPPER Returns the upper-case equivalent of a string.
  127.  
  128.    $test = "abc" UPPER 0 {Converts abc to upper-case, puts the result in $test
  129.                           Note the dummy 0 placeholder}
  130.  
  131. ASC Returns the ASCII code of the first character in the string.
  132.  
  133.    $test = $string ASC 0 {Computes the ASCII code of the first character
  134.                           of the contents of $string, stores in $test}
  135.  
  136. CHR Returns the corresponding string character, given the ASCII code.
  137.  
  138.    $test = $code CHR 0
  139.  
  140. INSTR Scans a string for a given substring. Returns 0 if not found.
  141.       Returns position of substring otherwise.
  142.  
  143.    $position = $mainstring INSTR $substring
  144.  
  145. LEN Returns the length of a string.
  146.  
  147.    $length = $string LEN 0
  148.    $length = "hello" LEN 0
  149.  
  150. LEFT Returns the leftmost number of specified characters.
  151.  
  152.    $leftpart = $string LEFT 4   {Returns leftmost 4 characters of contents
  153.                                  of $string}
  154.  
  155. MID Returns a substring from the middle of a string to the end.
  156.  
  157.    $midpart = $string MID 5     {Returns all characters from position 5
  158.                                  to the end of the contents of $string}
  159.  
  160.    $extract = "123456789" MID 3 LEFT 4 {In this example, two operations are
  161.                                         performed. First, the MID is done,
  162.                                         returning 3456789. Then LEFT is
  163.                                         applied returning 3456, the final
  164.                                         result.}
  165. SQR Returns the square root of a value.
  166.  
  167.    $root = $value SQR 0
  168.  
  169.                                   ==*==
  170.  
  171.                          Display/Serial I/O Commands
  172.                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  173.                     
  174. RS <variable> <prompt>
  175.  
  176.   Transmits optional prompt and reads a line of input into a variable. Input
  177.   is echoed character by character, and terminates with a carriage return.
  178.   The length parameter limits to the length of the input line.
  179.   RS $name "What is your Name?"
  180.  
  181. RX <variable> <prompt>
  182.  
  183.   Transmits optional prompt and reads a line of input into a variable.
  184.   X's are echoed as characters are input. Input terminates with a
  185.   carriage return.
  186.   RX $newpassword "What is your new password?"
  187.  
  188. RW <variable> <prompt>
  189.  
  190.   Transmits optional prompt and reads a line of input into a variable.
  191.   Input is echoed character by character, and WORD-WRAP is taken care of
  192.   automatically. Input terminates with a carriage return, or when the
  193.   line limit is reached. In the case of the line limit, the "broken" word
  194.   on the end is removed from the string and stored internally for the next
  195.   use of RW and the remaining line is stored in the script variable.
  196.   Use RW as the input command for message and text editors.
  197.   RW $line ">"
  198.  
  199. RN <variable> <prompt>
  200.  
  201.   RN is a lot like RS except it should be used to read numeric input.
  202.   RN will not allow bad characters or too many digits to be input.
  203.  
  204. RF <variable> <prompt>
  205.  
  206.   RF is similar to RS execpt it should be used to get filename input.
  207.   It will not allow a user to enter an invalid filename.
  208.  
  209. RC <variable> <prompt>
  210.  
  211.   Transmits optional prompt and waits for the user to press a key.
  212.   The key is stored in the variable, but is not echoed.
  213.   RC $char "Your Command? "
  214.  
  215. RR <variable> <restricted character list> <prompt>
  216.  
  217.   Transmits an optional prompt and waits for the user to press a key.
  218.   Keys not in the "restricted character list" are ignored.
  219.   The keystroke is not echoed. Not case-sensitive.
  220.   RR $key ABCD "Select: A, B, C, or D. "
  221.  
  222. RL <variable> <restricted character list> <numeric limit> <prompt>
  223.  
  224.   RR works with a restricted character list. RL uses a restricted character
  225.   list and a numeric range in forming user input. The low end of the rnage
  226.   is always 1. The high end of the range is the <numeric limit>.
  227.   For example:
  228.   RL $var Q 20 "Please Select 1-20, Q to Quit:"
  229.   Allows input of character Q or number between 1 and 20.
  230.   RL is very flexible and very handy. For more exmaple of use, see the
  231.   scripts.
  232.  
  233. RI <variable> <prompt>
  234.  
  235.   Much like RF, except it allows wildcard filenames.
  236.  
  237. TR <token 1> <token 2> ... <token 6>
  238.  
  239.   Automatically concatenates all of the tokens you specify
  240.   (both contents of variables and literals) and transmits the string
  241.   with a Carriage Return and Linefeed appended.
  242.  
  243.   TR "Welcome back to the BBS!"
  244.   TR "Hello " $name ", how are you doing today?"
  245.  
  246.   Additionally, optional output formatters can be used to make your numeric
  247.   and string variables print neatly.
  248.  
  249.   TR %s20 $s <= Variable $s, left justifies, pads to 20 length
  250.   TR %i4 $i  <= Variable $i, formatted to a 4 digit integer.
  251.   TR %d3.2 $d <= Variable $d, formatted to a decimal with form ###.##
  252.  
  253. TS <token 1> <token 2> ... <token 6>
  254.  
  255.   Same as TR except no Carraige Return/Linefeed is appended.
  256.  
  257. PAUSE <optional prompt string>
  258.  
  259.   If no string is specified, uses the default set-up by VCONFIG.EXE.
  260.   Transmits the prompt, waits for any key, then back-spaces over the prompt.
  261.  
  262.                                 ==*==
  263.  
  264.  
  265.                              Database Commands
  266.                             ~~~~~~~~~~~~~~~~~~~
  267.  
  268. DBGROUP <group identifier>
  269.  
  270.   Before you can execute the DB command, below, you must select a
  271.   database group. Grouping was implemented so that it would be much
  272.   easier to implement global functions and so that databases may be added
  273.   and deleted (using VCONFIG.EXE) without the need to edit the scripts
  274.   every time. The <group identifier> is a single identification character.
  275.   A to Z recommended.
  276.  
  277.   When you execute a DBGROUP command, the special variable $DBNUMBER
  278.   is loaded. It contains the number of databases in the group. The first
  279.   database in any group is number 1. This makes it easy for a script
  280.   to do global operations by using these lower and upper limits in a loop.
  281.  
  282.   The special variable $DBGROUP is loaded with the group id. Since LINK
  283.   clears normal variables, $DBGROUP could be used to pass group select
  284.   information to another script.
  285.  
  286.   How you group your databases is up to you. An example might be:
  287.   A for public message bases
  288.   F for public file bases
  289.   E for private Email & private bases
  290.   O for other databases (custom, imaginative database uses...)
  291.  
  292. DB <database #>
  293.  
  294.   The DB commands sets the current database for use. You must select a
  295.   database using this command somewhere in your script before any of the
  296.   other database commands (except DBGROUP) are used. Once you set the
  297.   database, it stay's set until another DB command is executed. Also, the
  298.   database must have been defined previously using VCONFIG.EXE.
  299.  
  300.   When a DB command is executed, "special" read-only variables
  301.   are automatically loaded:
  302.  
  303.   $DB     - The <database #> you specified. Use for passing this info to
  304.             other scripts when using the LINK command.
  305.   $DBNAME - The long name of the database.
  306.   $DBPATH - The path where database is located.
  307.   $DBFILE - The database filename.
  308.   $HIGHDB - This is the user's highest-database-entry-read quick-scan pointer.
  309.   $NUMBERDB - Number of entries in the database.
  310.   $WRITESL  - The database's write security level.
  311.  
  312. LOAD <entry number> <option>
  313.  
  314.   This command loads a database entry into special variables:
  315.  
  316.   $FROM     - The handle of the person who created the entry.
  317.   $FROMNO   - The User # of the person who created the entry.
  318.   $FROMNODE - VirtualNET node number of sender.
  319.   $TO       - The handle of the addressee, if any.
  320.   $TONO     - The User # of the addressee. 0 if to ALL.
  321.   $TONODE   - VirtualNET node number of addressee.
  322.   $SUBJECT  - The subject of the message, or brief description for a file.
  323.   $ORIGIN   - Origin - Optional - Use for BBS Tag Line, etc.
  324.   $ATTFILE  - Filename of 'attached' file, if any. Useful for DOWNLOAD command.
  325.   $SIZE     - Size of attached file. If no file, set to 0.
  326.   $DBFLAG   - Use is optional. Can be used as a message received flag
  327.               or any other desired purpose.
  328.   $DBCOUNT  - Use is optional. Can be used to count replies or
  329.               # of downloads, or any other desired purpose.
  330.   $DBTIME   - Creation time of entry.
  331.   $DBDATE   - Creation date of entry.
  332.  
  333.   Plus an additional variable called $RESULT. This is the result of
  334.   the LOAD operation. Returns:
  335.  
  336.   DEL if entry is marked as deleted,
  337.   OUT if entry number is out of range,
  338.   PRI if PRIVATE database, and user is not sender, addressee, or
  339.       SYSOP/Co-SYSOP (access with security level 250 or greater),
  340.   OK  otherwise.
  341.  
  342.   In addition to loading the special variables, LOAD also transfers
  343.   the memo file contents for the entry to the BUFFER and updates the
  344.   user's quick-scan pointer, unless you specify /Q for <option>.
  345.  
  346.   A typical use of the LOAD command to read messages might go like this:
  347.  
  348.   Use LOAD to load the entry (do NOT specify /Q option>
  349.   Test $RESULT
  350.   If OK, then use TR command to transmit the header data however you desire,
  351.               and use BUFFER LIST to display the memo line data.
  352.  
  353.   A typical use of the LOAD command to scan message titles might go like this:
  354.  
  355.   Use LOAD to load the entry specifying the /Q option
  356.   Test $RESULT
  357.   If OK, then use TR command to transmit the header data however you desire.
  358.  
  359. DEL <entry number>
  360.  
  361.   Marks an entry for deletion. This command, also, returns a result
  362.   in the special variable $RESULT. Returns:
  363.  
  364.   OUT if entry number is out of range,
  365.   PRI if the user is not sender, addressee, or SYSOP/Co-SYSOP.
  366.   OK  otherwise.
  367.  
  368. PACK
  369.  
  370.   Pack removes records which have been marked for deletion, and re-sequences
  371.   the database. It also updates user and network quickscan pointers.
  372.  
  373. ADDCOUNT <entry number>
  374.  
  375.   Adds 1 to the $DBCOUNT field of the entry number specified.
  376.  
  377. DBFLAG <entry number> <switch>
  378.  
  379.   Sets or Resets the $DBFLAG field of the entry number specified.
  380.   <switch> is either ON or OFF.
  381.  
  382. SEARCH <entry number> <key> <string>
  383.  
  384.   Searches the database, starting at the entry number specified.
  385.   <key> is either:
  386.         1 - Search TO field
  387.         2 - Search FROM field
  388.         3 - Search SUBJECT field
  389.         4 - Search FILENAME field (wildcards allowed)
  390.         5 - Search FILENAME field (wildcards not allowed)
  391.  
  392.   If <key> is 3, 4, or 5, then <string> is data to search for in field.
  393.  
  394.   SEARCH returns two results:
  395.   In $RESULT, OUT if not found,
  396.               OK otherwise.
  397.   In $SEARCH, the entry number where the search data was found.
  398.  
  399. QS <entry number>
  400.  
  401.   Manually change the user's quick-scan pointer to the entry number specified.
  402.  
  403. SAVE <to user #> <subject> <origin> <size> <attached filename> <to node #>
  404.  
  405.   Saves a database entry:
  406.     Header Information (the parameters on the line with SAVE).
  407.     Saves Memo Lines (the current contents of the BUFFER).
  408.  
  409.   <to user #> User # of addressee. If TO ALL, use 0.
  410.   <subject>   Data for subject field.
  411.   <origin>    Data for origin field.
  412.   <size>      Size of attach file, if any. Use 0 if none.
  413.   <attached filename> Filename of attached file, if any.
  414.   <to node #> VirtualNET Node # of addressee.
  415.  
  416.   The new entry header info is saved at the end of the current database file.
  417.   The BUFFER part is saved in a binary file and indexed (for speed).
  418.  
  419.   There are two other variants of the SAVE command: RESAVE and XSAVE. They
  420.   both take the same command line parameters as SAVE. They are different in
  421.   the way they handle the $FROM, $FROMNO, $FROMNODE data. When SAVE executes,
  422.   it saves the database entry as being from the user who is currently on-line.
  423.   XSAVE saves the database entry as though it were from the SysOp. (XSAVE is
  424.   useful is want the system to automatically generate messages from you to
  425.   them.) RESAVE is different. RESAVE was implemented so that database entries
  426.   could be edited by the SysOp, with losing the original "from user" data.
  427.   It would work like this: use LOAD to load the entry, edit it by editing the
  428.   contents of the BUFFER, and then use RESAVE to save it out. RESAVE
  429.   essentially saves a database entry, preserving the original "from user"
  430.   information.
  431.  
  432.                                  ==*==
  433.  
  434.                             File Transfer Commands
  435.                            ~~~~~~~~~~~~~~~~~~~~~~~~
  436.  
  437.            ** Note: To use the file transfer commands, you must   **
  438.            **    have DSZ.COM, an external protocol driver.       **
  439.            **    DSZ version 04-11-90 or newer is recommended!    **
  440.  
  441. DOWNLOAD <path\filename>
  442.  
  443.   Prompt user for desired protocol (as they have been set up using VCONFIG)
  444.   and then sends a file to the user. You may include a full path specification
  445.   along with the filename.
  446.  
  447. UPLOAD <path\filename>
  448.  
  449.   Just like DOWNLOAD except receives a file from a user.
  450.  
  451. BATCH
  452.  
  453.   Brings ups the batch functions handling routine.
  454.  
  455. REMOTEUPLOAD
  456.  
  457.   Allows user to upload one or more files to the SysOp Review Directory.
  458.  
  459. LISTFILES
  460.  
  461.   Prompts for a file mask (can include wildcards), and lists all files
  462.   in the current selected (DB) database.
  463.  
  464. SEARCHALL
  465.  
  466.   Prompts for a file mask (can include wildcards), and lists all files
  467.   in the each database for the current selected (DBGROUP) database group.
  468.  
  469. NEWFILES
  470.  
  471.   Lists all NEW files, all databases in the current DBGROUP.
  472.  
  473. FINDFILES
  474.  
  475.   Searches the description, all databases in the current DBGROUP.
  476.  
  477. SYSOPUPLOAD
  478.  
  479.   Local SysOp Upload.
  480.  
  481. REVIEWUPLOADS
  482.  
  483.   Allows Sysop to Review new uploads.
  484.  
  485. REVIEWFILE
  486.  
  487.   Review/download files sequentially by file number.
  488.  
  489. DOWNLOADFILE
  490.  
  491.   Review/download files by wildcard filename mask.
  492.  
  493. RATIO
  494.  
  495.   Displays User Ratio.
  496.  
  497. TOPDOWNLOADS
  498.  
  499.   Display List of Most Popular Downloads.
  500.  
  501.                                    ==*==
  502.  
  503.                       High Level Communications Functions
  504.                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  505.  
  506. SENDEMAIL
  507.  
  508.   Send Email to another User.
  509.  
  510. FEEDBACK
  511.  
  512.   Send Email to the SysOp.
  513.  
  514. READEMAILTO
  515.  
  516.   Read all Email to User.
  517.  
  518. READEMAILFROM
  519.  
  520.   Read all email from User.
  521.  
  522. READALLEMAIL
  523.  
  524.   SysOp read all mail on system.
  525.  
  526. SETQUICKSCAN
  527.  
  528.   Set database in current DBGROUP join/ignore during newscan.
  529.  
  530. LISTBASES
  531.  
  532.   Lists the databases in the current DBGROUP.
  533.  
  534. SELECTBASE
  535.  
  536.   Select a database from the current DBGROUP.
  537.  
  538. PREVBASE
  539.  
  540.   Switch to the previous database.
  541.  
  542. NEXTBASE
  543.  
  544.   Switch to the next database.
  545.  
  546. READSEQMSG
  547.  
  548.   Read messages, sequentially.
  549.  
  550. READNEWMSG
  551.  
  552.   Read new messages in all selected databases.
  553.  
  554. SCANMSG
  555.  
  556.   Scan the current database.
  557.  
  558. POST
  559.  
  560.   Write a message in the current database.
  561.  
  562. QUICKMAIL
  563.  
  564.   Use the MultiMail Functions.
  565.  
  566.                                    ==*==
  567.  
  568.                                BUFFER Commands
  569.                               ~~~~~~~~~~~~~~~~~
  570.  
  571. BUFFER CLEAR
  572.  
  573.   Clears out the BUFFER.
  574.  
  575. BUFFER APPEND <text>
  576.  
  577.   Appends the line of text to the BUFFER.
  578.  
  579. BUFFER LIST
  580.  
  581.   Transmits the current contents of the buffer.
  582.   Strips ANSI from the buffer if the online user's ANSI preference is
  583.   turned off.
  584.  
  585. BUFFER CHANGE <old text> <new text>
  586.  
  587.   Global change <old text> in the BUFFER to <new text>.
  588.  
  589. BUFFER EDIT
  590.  
  591.   Starts up the built in line editor.
  592.  
  593. BUFFER FULLEDIT
  594.  
  595.   Starts up the built full screen editor.
  596.  
  597. BUFFER SAVE <filename>
  598.  
  599.   Saves the contents of the buffer into a sequential file.
  600.  
  601. BUFFER LOAD <filename>
  602.  
  603.   Loads the buffer from a sequential (text) file.
  604.  
  605. BUFFER QUOTE
  606.  
  607.   Sort of like BUFFER CLEAR, but allows user to "quote" up to 20 lines
  608.   from the previous post (which are still in the buffer). After the lines
  609.   have been selected by the user, they are saved in a temporary space.
  610.   the BUFEFR is CLEARed, and the quoted lines are put back into the beginning
  611.   of the buffer, preceeded by a >.
  612.  
  613.                                ==*==
  614.                            
  615.                          Other Main Functions
  616.                          ~~~~~~~~~~~~~~~~~~~~
  617.  
  618. TEXTFILES
  619.  
  620.   Brings up the text files (bulletins) functions.
  621.  
  622. DOOR
  623.  
  624.   Brings up the DOOR functions.
  625.  
  626. AUTOPOST
  627.  
  628.   Brings up the autopost functions.
  629.  
  630. EDITFILE
  631.  
  632.   Allows Sysop to edit a text file. (200 line limit)
  633.  
  634. SYSINFO
  635.  
  636.   Displays the systsem information screen.
  637.  
  638. CLEANUP
  639.  
  640.   Packs all of the databases.
  641.  
  642. VOTE
  643.  
  644.   Brings up the voting booth functions.
  645.  
  646. CHECKVOTE
  647.  
  648.   Tells user if new polls exist, and takes them to the voting booth if so.
  649.  
  650. RANDOM
  651.  
  652.   Pulls up a random blurb from your random blurbs files and displays it.
  653.  
  654. ACCOUNT
  655.  
  656.   Brings up the account defaults set-up and allws the user to change them.
  657.  
  658. LISTNET
  659.  
  660.   Brings up the network listings functions.
  661.  
  662.                                ==*==
  663.  
  664.                            Sequential File I/O
  665.                           ~~~~~~~~~~~~~~~~~~~~~
  666.  
  667.  
  668. OPEN <filename> <access>
  669.  
  670.   <access> is INPUT, OUTPUT, or APPEND.
  671.  
  672. CLOSE
  673.  
  674.   Closes file previous opened with OPEN.
  675.  
  676. READ <var>
  677.  
  678.   Reads a line of input text from the file.
  679.   Returns !EOF! if the end of file has been reached.
  680.  
  681. WRITE <token1> <token2> ... <token7>
  682.  
  683.   Writes a line of text to the file.
  684.  
  685.                                  ==*==
  686.  
  687.                              Mutli-User Support
  688.                             ~~~~~~~~~~~~~~~~~~~~
  689.  
  690.  
  691. WHO
  692.  
  693.   Who else is on-line? Lists port #, user #, handle, current BBS activity.
  694.  
  695. ACTION <text>
  696.  
  697.   Sets the user's current BBS activity for the WHO command.
  698.  
  699. TELECON
  700.  
  701.   Enter the VBBS Teleconference Mode.
  702.  
  703.                                ==*==
  704.  
  705.                          Transfer/Control Commands
  706.                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  707.  
  708.  
  709. # <label>
  710.  
  711.   Defines a label line.
  712.  
  713. GO <label>
  714.  
  715.   Go to the label specified.
  716.  
  717. CALL <label>
  718.  
  719.   Call a subroutine located at <label>.
  720.  
  721. RET
  722.  
  723.   Return from a CALL command.
  724.  
  725. TEST <token1> <relation> <token2> <label>
  726.  
  727.   Perform a non-case-sensitive string comparison and go to <label> if true.
  728.   <token1> and <token2> may be either variables or constants.
  729.   <relation> is one of the following:
  730.   <> Not equal
  731.   =  Equal
  732.   <= Less than or equal
  733.   >= Greater than or equal
  734.   <  Less than
  735.   >  Greater than
  736.  
  737. TESTVAL <token1> <relation> <token2> <label>
  738.  
  739.   Perform a numeric comparison and go to <label> if true.
  740.   <token1> and <token2> may be either variables or constants.
  741.   <relation> is the same as for TEST.
  742.  
  743. LINK <script filename>
  744.  
  745.   Chain to a new script file. All old variables are cleared before the new
  746.   script starts executing. It is recommended that your break your scripts
  747.   into small modules and use LINK to jump from one script to another.
  748.   LINK does not clear the global variables, $GLOBAL0 to $GLOBAL29, or any of
  749.   the special read-only variables. NOTE: The script filename should be
  750.   a name of 8 characters or less and not contain an extension.
  751.  
  752. SHELL <text>
  753.  
  754.   Shell to DOS, executing <text> on command.com startup.
  755.   When the shell process is finished, control returns to VBBS and
  756.   the script processor.
  757.  
  758. BREAK <label>
  759.  
  760.   Specifies the label to branch to if Ctrl-C is detected. To turn off
  761.   Ctrl-C checking, issue a BREAK OFF command.
  762.  
  763.                              ==*==
  764.  
  765.                             User Data Commands
  766.                            ~~~~~~~~~~~~~~~~~~~~
  767.  
  768. SETFLAGS <flag> <switch>
  769.  
  770.   These are optional, sysop-defined general purpose flags.
  771.   <flag> is a character from A to Z.  <switch> is ON or OFF.
  772.   When a user logs on, the special variable $FLAGS is automatically loaded.
  773.  
  774. SETEXTRA <extra #> <text>
  775.  
  776.   There are 9 extra 16-character fields for your use.
  777.   <extra #> is 1 to 9. <text> is text to write into the data field.
  778.   When a user logs on, the special variables $EXTRA1 to $EXTRA9
  779.   are automatically loaded. More special variables, loaded at login-time:
  780.  
  781.   $SECURITY - User's security level. 250 and up is considered
  782.               Co-sysop/Sysop access. Use TESTVAL and this variable to
  783.               implement your own security.
  784.   $NAME     - User's real name.
  785.   $TITLE    - SysOp-Defined field.
  786.   $HANDLE   - User's handle.
  787.   $USER     - User's account number.
  788.   $TIMESON  - Number of logons
  789.   $TOTALMIN - Total number of minutes on since account was created.
  790.   $TIMEON   - Number of minutes on for this session.
  791.   $TIMELEFT - Number of minutes left for this session.
  792.   $MAXTIME  - Maximum minutes per day.
  793.   $ANSI     - Contains ON or OFF depending on user's selection of ANSI.
  794.   $PAGE     - Number of lines to print before pause.
  795.  
  796.                                     ==*==
  797.  
  798.                             Miscellaneous Commands
  799.                            ~~~~~~~~~~~~~~~~~~~~~~~~
  800.  
  801. LISTUSERS
  802.  
  803.   Lists out all user accounts.
  804.  
  805. SECURITY
  806.  
  807.   Lists out all user accounts with:
  808.   Security lvl > 150 or non-zero Group Code
  809.  
  810. KILL <filename>
  811.  
  812.   A clean way to delete a file.
  813.  
  814. CHECKFILE <variable> <path/filename>
  815.  
  816.   Stores size of file into variable. If file is non-existant, returns 0.
  817.  
  818. JR <variable> <size>
  819.  
  820.   Right-justify the contents of a variable, padding with spaces.
  821.  
  822. JL <variable> <size>
  823.  
  824.   Left-justify the contents of a variable, padding with spaces.
  825.  
  826. JC <variable> <size>
  827.  
  828.   Center-justify the contents of a variable, padding with spaces.
  829.  
  830. EF <path/filename>
  831.  
  832.   Transmits the contents of the text file.
  833.  
  834. LOG <text>
  835.  
  836.   Write text to the BBS log file, BBS.LOG.
  837.  
  838. LOGOFF
  839.  
  840.   Terminates script execution and logs the user off.
  841.  
  842. LOGOFFYN
  843.  
  844.   Much like LOGOFF, but prompts for confirmation first.
  845.  
  846. BEEP
  847.  
  848.   Beeps the PC speaker. Useful if you want a "Page the SYSOP" feature.
  849.  
  850. ! <comment line>
  851.  
  852.   A ! at the beginning of a line denotes a script comment line.
  853.   These lines are ignored by the VBBS script loader/parser.
  854.  
  855. USEREDIT
  856.  
  857.    The USEREDIT script command lets the sysop do remote user editing.
  858.  
  859. MENU <filename>
  860.  
  861.    Transmits file <filename>.ans is user has ANSI, <filename>.asc otherwise.
  862.  
  863.    If ! is the first character of the line, VBBS interpets this as
  864.    "don't print this line unless the user's security level is greater
  865.    or equal to the immediately preceeding three-digit number."
  866.    Examples:
  867.    !255 S) SysOp Menu  <== Line not printed unless the user has SL >= 255.
  868.    !100 F) Forward     <==  "    "     "      "     "   "    "  "  "  100.
  869.  
  870. ADDKEYS <variable> <keys to add> <min. security level>
  871.  
  872.    Concatenates a string to the variable specified, if the user's
  873.    Security Lebel is greater than or equal to the msl specified.
  874.  
  875. FINDFIRST <variable> <mask to search>
  876.  
  877.    Searches the DOS Directory, for the first file to match the mask
  878.    specified.
  879.  
  880. FINDNEXT <variable>
  881.  
  882.    Finds the next matches after a FINDFIRST. Will return a null string ""
  883.    when the search has ended.
  884.  
  885. NEWPAGE
  886.  
  887.   Resets the "Pause on screen" line counter.
  888.  
  889. PAGESYSOP
  890.  
  891.   Pages the SYSOP BEEPER is Scroll Lock is activated.
  892.  
  893.  
  894. More Commands:
  895. ~~~~~~~~~~~~~~~
  896.  
  897. The DO LOOP:
  898.  
  899.    In this form, the variable loops from start to end.
  900.  
  901.    DO <var> = <start> <end>
  902.       [body of loop]
  903.    LOOP
  904.  
  905.    In this form, DO performs while a specific variable is non-zero.
  906.  
  907.    DO WHILE <var>
  908.      [body of loop]
  909.    LOOP
  910.  
  911. IF-THEN-ELSE-ENDIF:
  912.  
  913.    IF <expr> <relation> <expr> THEN
  914.       [then-code]
  915.    ELSE
  916.       [else-code]
  917.    ENDIF
  918.  
  919.    IF <expr> <relation> <expr> THEN
  920.       [then-code]
  921.    ENDIF
  922.  
  923.    Use IFVAL to test numeric relationships.
  924.    Relations are the same as for TEST and TESTVAL.
  925.  
  926. A few miscellaneous special variables:
  927.   $DATE  - Current system date.
  928.   $TIME  - Current system time.
  929.   $PORT  - Port Number.
  930.   $BAUD  - Baud Rate of Connection.
  931.   $NODE  - Your system's VirtualNET node number as defined by VCONFIG.EXE.
  932.   $BBSNAME  - Name of BBS as defined by VCONFIG.EXE.
  933.   $SYSOP    - Name of SysOp as defined by VCONFIG.EXE.
  934.   $AVAILABLE - SysOp Available. Contains Y or N.
  935.  
  936. A few miscellaneous special constants:
  937.   $CLEAR - Set to Ctrl-L (ascii code 12) when ANSI is OFF, Otherwise set to
  938.            the ANSI clear screen command.
  939.   $CR    - Carriage Return (ascii code 13).
  940.   $LF    - Linefeed        (ascii code 10).
  941.   $BS    - Back Space      (ascii code 8).
  942.   $BELL  - Bell            (ascii code 7).
  943.   $CRLF  - Carriage Return and Linefeed.
  944.  
  945.         =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  946.  
  947.                                The Database
  948.                               ~~~~~~~~~~~~~~
  949.  
  950. The database can be used for a lot of different purposes. You can store
  951. messages, file descriptions, or even messages with attached files.
  952. Also, there is no reason why you can't redefine the fields and use them
  953. for other types of data storage.
  954.  
  955. There are two parts to each database entry; The HEADER INFORMATION, and
  956. the MEMO LINES. Header info is data like sender's name, subject,
  957. addressee, etc. Memo Lines are the actual body of the entry.
  958. They are the message text or long file description, dpending on how you
  959. are using the database.
  960.  
  961. Each database must reside in it's own hard disk sub-directory.
  962. In addition to the file which holds the header info, and the text files
  963. which hold the memo lines, there are two other files. One stores
  964. user quick-scan pointers. The other stores network quick-scan pointers.
  965.  
  966. Using the BUFFER is an integral part of the database system. The BUFFER is
  967. really nothing more than a RAM array of strings which holds work
  968. in-progress. You can use the BUFFER commands to build your own Editor.
  969.  
  970.  
  971.     =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  972.  
  973.                     Compiling Scripts with VCOM.EXE
  974.                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  975.  
  976. VCOM.EXE is the Virtual BBS/NET script language compiler. VCOM expects the
  977. source code file for the script to have a .V extension.
  978.  
  979. During compilation, VCOM generates two files for the script:
  980.  
  981.    .LIT file: The literal data from the source code.
  982.    .COD file: The actual program in numeric integer-coded form.
  983.  
  984. If your script is called MAIN.V, then the command line to compile the
  985. script would be:
  986.  
  987. VCOM MAIN
  988.  
  989. And the compiler will generate MAIN.LIT and MAIN.COD.
  990.  
  991. The compiler will trap any GO, TEST, TESTVAL, CALL, or BREAK commands which
  992. do not have a valid destination label. You will have to fix the error and
  993. compile again. This error message may also appear if there is a syntax error
  994. in the GO/TEST/TESTVAL/CALL/BREAK command line.
  995.  
  996. It will also trap any attempt to use duplicate line labels.
  997.  
  998. Include Files Compiler Directive
  999.  
  1000. Also, you may "include" other .V files in the compilation of your scripts.
  1001. That way, you can write a common routine once, and use it with other script
  1002. modules without the need to type (or cut/paste) the code into the modules
  1003. by hand. The include directive is & and it must be the first character
  1004. on the line. It must be followed by a space, and then the filename of
  1005. the file to include. Example:
  1006. & editor.v
  1007.  
  1008.                          -=-=-=-=-=-=-=-=-=-=-=-=-=-
  1009.  
  1010.     For further discussion of Vscripts and access to modifications,
  1011. modified and additional Vscripts, please join us on the VirtualNET
  1012. Vscripts sub board and the VirtualNET networked Vscripts and Source Mods
  1013. Networked File listings.
  1014.  
  1015.